<div class="main_body" id="main_body">
    <div class="breadcrub">
        当前位置：文章管理>文章列表
    </div>
    <div class="pannel">
        <span class="sel_label">请选择文章分类：</span>
        <form id="form" method="get" action="/index">
            <select name="select" id="select" class="sel_opt">
                <option value="0">全部</option>
                {{range .articleType}}
                    {{if compare $.typeid .Id}}
                        <option selected="selected" value="{{.Id}}">{{.Tname}}</option>
                    {{else}}
                        <option value="{{.Id}}">{{.Tname}}</option>
                    {{end}}
                {{end}}
            </select>
            <input type="submit" hidden="hidden">
        </form>
        <table class="common_table">
            <tr>
                <th width="43%">文章标题</th>
                <th width="10%">文章内容</th>
                <th width="16%">添加时间</th>
                <th width="7%">阅读量</th>
                <th width="7%">删除</th>
                <th width="7%">编辑</th>
                <th width="10%">文章类型</th>
            </tr>

            {{range .articles}}
                <tr>
                    <td>{{.ArtiName}}</td>
                    <td><a href="/content?id={{.Id}}">查看详情</a></td>
                    <td> {{.Atime.Format "2006-01-02 15:04:05"}}</td>
                    <td>{{.Acount}}</td>
                    <td><a href="/delete?id={{.Id}}" class="dels">删除</a></td>
                    <td><a href="/update?id={{.Id}}">编辑</a></td>
                    <td>{{.ArticleType.Tname}}</td>
                </tr>
            {{end}}
        </table>

                    <ul class="pagenation">
                        <li><a href="/index?pageIndex=1">首页</a></li>
                        <li><a href="/index?pageIndex={{.pageIndex | ShowPrePage}}&select={{.typeid}}">上一页 </a> </li>
                        <li> <a href="/index?pageIndex={{.pageIndex | ShowNextPage}}&select={{.typeid}}">下一页</a></li>
                        <li><a href="/index?pageIndex={{.pageCount}}">末页</a></li>
                        <li>共{{.count}}条记录/共{{.pageCount}}页/当前{{.pageIndex}}页</li>
                    </ul>
    </div>
</div>
